package cn.iocoder.devlop.module.annual.report.common.vo;

import cn.hutool.core.lang.Dict;
import cn.iocoder.devlop.framework.common.validation.InEnum;
import cn.iocoder.devlop.module.annual.report.enums.ChangeInfoNotificationEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * 变更信息通知Vo
 *
 * @author Euan
 * @since 2024/1/18
 */
@Data
public class ChangeInfoNotificationVo {


    @Schema(description = "通知事件类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "14462")
    @NotNull(message = "通知事件类型不能为空")
    @InEnum(value = ChangeInfoNotificationEnum.Type.class, message = "错误的事件类型只允许 {value}")
    private String type;

    @Schema(description = "目标表", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "目标表不能为空")
    @InEnum(value = ChangeInfoNotificationEnum.Target.class, message = "错误的表名只允许 {value}")
    private String target;

    @Schema(description = "变更数据", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "变更数据不能为空")
    private Dict data;
}
